﻿@using PersonBlog.Model
@using PersonBlog.Extend;

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    WeatherInfoEntity wiEntity = ViewBag.WeatherInfo == null ? null : ViewBag.WeatherInfo;

    List<AgendaManageEntity> agendaList = ViewBag.AgendaList == null ? new List<AgendaManageEntity>() : ViewBag.AgendaList;

    List<TaskManageModel> taskList = ViewBag.TaskList == null ? new List<TaskManageModel>() : ViewBag.TaskList;
}

<!-- Graph JavaScript -->
<script src="~/js/d3.v3.js"></script>
<script src="~/js/rickshaw.js"></script>


<div class="graphs">
    <div class="col_3">
        <div class="col-md-3 widget widget1">
            <div class="r3_counter_box">
                <i class="pull-left fa fa-thumbs-up icon-rounded"></i>
                <div class="stats">
                    <h5><strong>45%</strong></h5>
                    <span>New Orders</span>
                </div>
            </div>
        </div>
        <div class="col-md-3 widget widget1">
            <div class="r3_counter_box">
                <i class="pull-left fa fa-users user1 icon-rounded"></i>
                <div class="stats">
                    <h5><strong>1019</strong></h5>
                    <span>New Visitors</span>
                </div>
            </div>
        </div>
        <div class="col-md-3 widget widget1">
            <div class="r3_counter_box">
                <i class="pull-left fa fa-comment user2 icon-rounded"></i>
                <div class="stats">
                    <h5><strong>1012</strong></h5>
                    <span>New Users</span>
                </div>
            </div>
        </div>
        <div class="col-md-3 widget">
            <div class="r3_counter_box">
                <i class="pull-left fa fa-dollar dollar1 icon-rounded"></i>
                <div class="stats">
                    <h5><strong>$450</strong></h5>
                    <span>Profit Today</span>
                </div>
            </div>
        </div>
        <div class="clearfix"> </div>
    </div>
    <div class="col_1">
        <div class="col-md-4 span_7">
            <div class="cal1 cal_2"><div class="clndr"><div class="clndr-controls"><div class="clndr-control-button"><p class="clndr-previous-button">previous</p></div><div class="month">July 2015</div><div class="clndr-control-button rightalign"><p class="clndr-next-button">next</p></div></div><table class="clndr-table" border="0" cellspacing="0" cellpadding="0"><thead><tr class="header-days"><td class="header-day">S</td><td class="header-day">M</td><td class="header-day">T</td><td class="header-day">W</td><td class="header-day">T</td><td class="header-day">F</td><td class="header-day">S</td></tr></thead><tbody><tr><td class="day adjacent-month last-month calendar-day-2015-06-28"><div class="day-contents">28</div></td><td class="day adjacent-month last-month calendar-day-2015-06-29"><div class="day-contents">29</div></td><td class="day adjacent-month last-month calendar-day-2015-06-30"><div class="day-contents">30</div></td><td class="day calendar-day-2015-07-01"><div class="day-contents">1</div></td><td class="day calendar-day-2015-07-02"><div class="day-contents">2</div></td><td class="day calendar-day-2015-07-03"><div class="day-contents">3</div></td><td class="day calendar-day-2015-07-04"><div class="day-contents">4</div></td></tr><tr><td class="day calendar-day-2015-07-05"><div class="day-contents">5</div></td><td class="day calendar-day-2015-07-06"><div class="day-contents">6</div></td><td class="day calendar-day-2015-07-07"><div class="day-contents">7</div></td><td class="day calendar-day-2015-07-08"><div class="day-contents">8</div></td><td class="day calendar-day-2015-07-09"><div class="day-contents">9</div></td><td class="day calendar-day-2015-07-10"><div class="day-contents">10</div></td><td class="day calendar-day-2015-07-11"><div class="day-contents">11</div></td></tr><tr><td class="day calendar-day-2015-07-12"><div class="day-contents">12</div></td><td class="day calendar-day-2015-07-13"><div class="day-contents">13</div></td><td class="day calendar-day-2015-07-14"><div class="day-contents">14</div></td><td class="day calendar-day-2015-07-15"><div class="day-contents">15</div></td><td class="day calendar-day-2015-07-16"><div class="day-contents">16</div></td><td class="day calendar-day-2015-07-17"><div class="day-contents">17</div></td><td class="day calendar-day-2015-07-18"><div class="day-contents">18</div></td></tr><tr><td class="day calendar-day-2015-07-19"><div class="day-contents">19</div></td><td class="day calendar-day-2015-07-20"><div class="day-contents">20</div></td><td class="day calendar-day-2015-07-21"><div class="day-contents">21</div></td><td class="day calendar-day-2015-07-22"><div class="day-contents">22</div></td><td class="day calendar-day-2015-07-23"><div class="day-contents">23</div></td><td class="day calendar-day-2015-07-24"><div class="day-contents">24</div></td><td class="day calendar-day-2015-07-25"><div class="day-contents">25</div></td></tr><tr><td class="day calendar-day-2015-07-26"><div class="day-contents">26</div></td><td class="day calendar-day-2015-07-27"><div class="day-contents">27</div></td><td class="day calendar-day-2015-07-28"><div class="day-contents">28</div></td><td class="day calendar-day-2015-07-29"><div class="day-contents">29</div></td><td class="day calendar-day-2015-07-30"><div class="day-contents">30</div></td><td class="day calendar-day-2015-07-31"><div class="day-contents">31</div></td><td class="day adjacent-month next-month calendar-day-2015-08-01"><div class="day-contents">1</div></td></tr></tbody></table></div></div>
            <!----Calender -------->
            <link rel="stylesheet" href="~/css/clndr.css" type="text/css" />
            <script src="~/js/underscore-min.js" type="text/javascript"></script>
            <script src="~/js/moment-2.2.1.js" type="text/javascript"></script>
            <script src="~/js/clndr.js" type="text/javascript"></script>
            <script src="~/js/site.js" type="text/javascript"></script>
            <!----End Calender -------->
        </div>
        <div class="col-md-4 span_8">
            <div class="activity_box">
                <div class="scrollbar" id="style-2">
                    @if (taskList.Count > 0)
                    {
                        foreach (TaskManageModel item in taskList)
                        {
                            <div class="activity-row">
                                <div class="col-xs-1"><i class="fa fa-thumbs-up text-info icon_13"> </i>  </div>
                                <div class="col-xs-3 activity-img"><img src='~/images/5.png' class="img-responsive" alt="" /></div>
                                <div class="col-xs-8 activity-desc">
                                    <h5>@item.Name</h5>
                                    <p>@item.Desc</p>
                                    <h6>@(item.StartTime.Value.ToString("MM月dd日HH时"))</h6>
                                </div>
                                <div class="clearfix"> </div>
                            </div>
                        }
                    }
                    @*<div class="activity-row">
                        <div class="col-xs-1"><i class="fa fa-thumbs-up text-info icon_13"> </i>  </div>
                        <div class="col-xs-3 activity-img"><img src='~/images/5.png' class="img-responsive" alt="" /></div>
                        <div class="col-xs-8 activity-desc">
                            <h5><a href="#">Lorem Ipsum</a> liked <a href="#">random</a></h5>
                            <p>Lorem Ipsum is simply dummy</p>
                            <h6>8:03</h6>
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                    <div class="activity-row">
                        <div class="col-xs-1"><i class="fa fa-comment text-info"></i> </div>
                        <div class="col-xs-3 activity-img"><img src='~/images/3.png' class="img-responsive" alt="" /></div>
                        <div class="col-xs-8 activity-desc">
                            <h5><a href="#">simply random</a> liked <a href="#">passages</a></h5>
                            <p>Lorem Ipsum is simply dummy</p>
                            <h6>8:03</h6>
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                    <div class="activity-row">
                        <div class="col-xs-1"><i class="fa fa-check text-info icon_11"></i></div>
                        <div class="col-xs-3 activity-img"><img src='~/images/1.png' class="img-responsive" alt="" /></div>
                        <div class="col-xs-8 activity-desc">
                            <h5><a href="#">standard chunk</a> liked <a href="#">model</a></h5>
                            <p>Lorem Ipsum is simply dummy</p>
                            <h6>8:03</h6>
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                    <div class="activity-row1">
                        <div class="col-xs-1"><i class="fa fa-user text-info icon_12"></i></div>
                        <div class="col-xs-3 activity-img"><img src='~/images/4.png' class="img-responsive" alt="" /></div>
                        <div class="col-xs-8 activity-desc">
                            <h5><a href="#">perspiciatis</a> liked <a href="#">donating</a></h5>
                            <p>Lorem Ipsum is simply dummy</p>
                            <h6>8:03</h6>
                        </div>
                        <div class="clearfix"> </div>
                    </div>*@
                </div>
            </div>
        </div>
        <div class="col-md-4 stats-info">
            <div class="panel-heading">
                <h4 class="panel-title">Browser Stats</h4>
            </div>
            <div class="panel-body">
                <ul class="list-unstyled">
                    <li>Google Chrome<div class="text-success pull-right">12%<i class="fa fa-level-up"></i></div></li>
                    <li>Firefox<div class="text-success pull-right">15%<i class="fa fa-level-up"></i></div></li>
                    <li>Internet Explorer<div class="text-success pull-right">18%<i class="fa fa-level-up"></i></div></li>
                    <li>Safari<div class="text-danger pull-right">17%<i class="fa fa-level-down"></i></div></li>
                    <li>Opera<div class="text-danger pull-right">10%<i class="fa fa-level-down"></i></div></li>
                    <li>Mobile &amp; tablet<div class="text-success pull-right">14%<i class="fa fa-level-up"></i></div></li>
                    <li class="last">Others<div class="text-success pull-right">5%<i class="fa fa-level-up"></i></div></li>
                </ul>
            </div>
        </div>
        <div class="clearfix"> </div>
    </div>
    <div class="content_bottom">
        <div class="col-md-8 span_3">
            <div id="myCarousel" class="carousel slide">
                <!-- 轮播（Carousel）指标 -->
                <ol class="carousel-indicators">
                    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                    <li data-target="#myCarousel" data-slide-to="1"></li>
                    <li data-target="#myCarousel" data-slide-to="2"></li>
                </ol>
                <!-- 轮播（Carousel）项目 -->
                <div class="carousel-inner">
                    <div class="item active">
                        <img src="~/img/portfolio/1.jpg" alt="First slide">
                    </div>
                    <div class="item">
                        <img src="~/img/portfolio/2.jpg" alt="Second slide">
                    </div>
                    <div class="item">
                        <img src="~/img/portfolio/3.jpg" alt="Third slide">
                    </div>
                </div>
            </div>
            <script>
                $('#myCarousel').carousel({
                    interval: 2000
                })
            </script>
        </div>
        <div class="col-md-4 span_4">
            <div class="col_2">
                @if (agendaList.Count > 0)
                {
                    <div class="box_1">
                        <div class="col-md-6 col_1_of_2 span_1_of_2">
                            <a class="tiles_info">
                                @if (agendaList.Count > 0 && agendaList[0] != null)
                                {
                                    <div class="tiles-head red1">
                                        <div class="text-center">@agendaList[0].Topic</div>
                                    </div>
                                    <div class="tiles-body red">@agendaList[0].StartTime.Value.ToDaysFromNow()</div>
                                }
                            </a>
                        </div>
                        <div class="col-md-6 col_1_of_2 span_1_of_2">
                            <a class="tiles_info tiles_blue">
                                @if (agendaList.Count > 1 && agendaList[1] != null)
                                {
                                    <div class="tiles-head tiles_blue1">
                                        <div class="text-center">@agendaList[1].Topic</div>
                                    </div>
                                    <div class="tiles-body blue1">@agendaList[1].StartTime.Value.ToDaysFromNow()</div>
                                }
                            </a>
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                    <div class="box_1">
                        <div class="col-md-6 col_1_of_2 span_1_of_2">
                            <a class="tiles_info">
                                @if (agendaList.Count > 2 && agendaList[2] != null)
                                {
                                    <div class="tiles-head fb1">
                                        <div class="text-center">@agendaList[2].Topic</div>
                                    </div>
                                    <div class="tiles-body fb2">@agendaList[2].StartTime.Value.ToDaysFromNow()</div>
                                }

                            </a>
                        </div>
                        <div class="col-md-6 col_1_of_2 span_1_of_2">
                            <a class="tiles_info tiles_blue">
                                @if (agendaList.Count > 3 && agendaList[3] != null)
                                {
                                    <div class="tiles-head tw1">
                                        <div class="text-center">@agendaList[3].Topic</div>
                                    </div>
                                    <div class="tiles-body tw2">@agendaList[3].StartTime.Value.ToDaysFromNow()</div>
                                }
                            </a>
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                }
            </div>
            <div class="cloud">
                @if (wiEntity != null)
                {
                    <div class="grid-date">
                        <div class="date">
                            <p class="date-in">@wiEntity.CityName<span><a href="@Url.Action("Index","Weather")">[更多城市]</a></span></p>
                            <span class="date-on">@wiEntity.WindDir </span>
                            <div class="clearfix"> </div>
                        </div>
                        <h4>@wiEntity.Temperature<i class=""><img src='~/images/weather/b_@wiEntity.PicOne' />/<img src='~/images/weather/b_@wiEntity.PicTwo' /></i></h4>
                    </div>
                    <p class="monday">@wiEntity.Weather</p>
                }
            </div>
        </div>
        <div class="clearfix"> </div>
    </div>
</div>
